package me.idashu.attg.service;

import java.util.List;
import java.util.Map;

import me.idashu.attg.domain.KeywordsEntity;
import me.idashu.attg.persistence.KeywordsMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class KeywordsService {
	@Autowired
	private KeywordsMapper keywordsMapper;
	
	public int keywordsCount(){
		return keywordsMapper.keywordsCount();
	}
	
	public List<KeywordsEntity> keywordsList(Map<String, Object> map){
		return keywordsMapper.keywordsList(map);
	}
	
	public void deleteKeywords(int keywordsId){
		keywordsMapper.deleteKeywords(keywordsId);
	}
	
	public int getKeywords(String keywords){
		return keywordsMapper.getKeywords(keywords);
	}
	
	public void addKeywordsInfo(KeywordsEntity keywordsEntity){
		keywordsMapper.addKeywordsInfo(keywordsEntity);
	}
	
	public String getKeywordsById(int keywordsId){
		return keywordsMapper.getKeywordsById(keywordsId);
	}
	
	public void updateKeywordsInfo(KeywordsEntity keywordsEntity){
		keywordsMapper.updateKeywordsInfo(keywordsEntity);
	}
	
	public int contentKeywords(String keywords){
		return keywordsMapper.contentKeywords(keywords);
	}
	
	public List<KeywordsEntity> getAllKeyWords(){
		return keywordsMapper.getAllKeyWords();
	}
}
